package Java02;

class Person{
	private String name;
	private int age;
	private boolean gender;
	public Person(String name, int age, boolean gender) {
		this.name = name;
		this.age = age;
		this.gender = gender;
	}
	@Override
	public String toString() {
		return this.name+"-"+this.age+"-"+this.gender;
	}
	
}
class Company{
	private String company;
	public Company(String company) {
		this.company = company;
	}
	@Override
	public String toString() {
		return this.company;
	}
}
class Employee extends Person{
	private Company company;
	private double salary;
	public Employee(String name, int age, boolean gender,Company company,double salary) {
		super(name, age, gender);
		this.company=company;
		this.salary=salary;
	}
	
	@Override
	public String toString() {
		return super.toString()+"-"+company.toString()+"-"+this.salary;
	}
	
}

public class Main {

    public static void main(String[] args) {
    	Employee n=new Employee("zhang",23,true,new Company("IBM"),9000.123);
    	System.out.println(n);
    }
}